<template>
	<view class="container">
		<scroll-view scroll-y="true" class="scroll">
			<view class="scroll-center">
				<view class="orderMesg" v-for="(item,index) in listOrder" :key="index">
					<view class="order_top" v-for="(items,indexs) in item.orderInfoList" :key="indexs">
						<view class="orderTop_a">
							<image :src="items.image" mode=""></image>
						</view>
						<view class="orderTop_b">
							<view class="a_1">
								<view class="a_tex">
									{{items.storeName}}
								</view>
								<view class="a_time">
									付款时间：{{item.payTime}}
								</view>
							</view>

							<view class="a_2">
								<view class="a_2_l">
									<view class="a_money">
										订单金额：
									</view>
									<view class="jiage">
										￥{{item.payPrice}}
									</view>
								</view>
								<view class="a_btn">
									<button>申请退款</button>
								</view>
							</view>
						</view>
					</view>
					<view class="xian"></view>
					<view class="roder_btm">
						<view class="adres_name">
							<view class="shr_name">收货人：<text>某某某</text></view>
							<view class="shr_name">联系电话：<text>18866889966</text></view>
						</view>
						<view class="adres_ship">
							收货地址：山东省青岛市城阳区正阳中路1889号青特小镇12号楼2单元1603
						</view>
					</view>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	import $http from "@/ajax/http.js"
	export default {
		data() {
			return {
				listOrder: [],
				token: wx.getStorageSync('shopToken'),
			}
		},
		onLoad(options) {
			this.orderList();
		},
		methods: {
			orderList() {
				$http.request({
					header: {
						"Authori-zation": this.token
					},
					url: '/api/front/order/list',
					data: {
						type: 1
					}
				}, 2).then((res) => {
					this.listOrder = res.list
					console.log(res.list, "订单列表");
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.container {
		width: 100%;
		background-color: #f5f5f5;

		.scroll {
			height: calc(100vh);

			.scroll-center {
				display: flex;
				justify-content: center;
				align-items: center;
				flex-direction: column;

				.orderMesg {
					margin-top: 30rpx;
					width: 674upx;
					height: 344upx;
					background-color: #ffffff;
					border-radius: 20upx;
					display: flex;
					flex-direction: column;
					justify-content: space-around;
					align-items: center;

					.order_top {
						display: flex;
						justify-content: space-between;
						width: 609upx;

						.orderTop_a {
							width: 128upx;
							height: 128upx;
							border-radius: 11upx;

							image {
								width: 128upx;
								height: 128upx;
								border-radius: 11upx;
							}
						}

						.orderTop_b {
							width: 460upx;
							display: flex;
							justify-content: space-between;
							flex-direction: column;

							.a_1 {
								height: 60upx;
								display: flex;
								flex-direction: column;
								justify-content: space-between;

								.a_tex {
									font-weight: 400;
									font-size: 30upx;
									color: #333333;
								}

								.a_time {
									font-weight: 400;
									font-size: 20upx;
									color: #868686;
								}
							}


							.a_2 {
								width: 460upx;
								display: flex;
								flex-direction: row;
								justify-content: space-between;

								.a_2_l {
									display: flex;
									flex-direction: row;
								}

								.a_money {
									font-weight: 400;
									font-size: 22upx;
									color: #333333;
								}

								.jiage {
									font-weight: 500;
									font-size: 25upx;
									color: #D81A31;
								}

								.a_btn {

									button {
										height: 38upx;
										line-height: 38upx;
										font-weight: 400;
										font-size: 22upx;
										color: #FFFFFF;
										border-radius: 25upx;
										background: linear-gradient(to right, rgba(65, 196, 180, 1), rgba(0, 129, 139, 1));
									}
								}
							}
						}
					}

					.xian {
						position: relative;
						width: 600rpx;
						height: 1rpx;
						background-color: #eeeeee;
					}

					.roder_btm {
						line-height: 40rpx;
						width: 609rpx;
						display: flex;
						flex-direction: column;
						justify-content: space-around;

						.adres_name {
							font-weight: 600;
							font-size: 22rpx;
							color: #666666;
							display: flex;
							flex-direction: row;
							justify-content: space-between;
						}

						.adres_ship {
							line-height: 34rpx;
							font-weight: 600;
							font-size: 22rpx;
							color: #666666;
						}
					}
				}

			}
		}
	}
</style>